class Car extends Vehicle {
    private int loader; // 载人数
    // 构造方法
    public Car(){

    }
    public Car(int wheels,double weight,int loader){
        super(wheels,weight);
        this.loader = loader;
    }

    // get,set方法
    public int getLoader(){
        return loader;
    }
    public void setLoader(int loader){
        this.loader = loader;
    }
    // 判断超载的方法
    public void isLoader(){
        if(loader>5){
            System.out.println("此Car对象超载!");
        }else{
            System.out.println("此Car对象搭载了 "+loader+" 名乘客!");
        }
    }
    public void isOverweiht(){

    }
    
}
